package com.ym.manager.admin.user;

import com.ym.manager.admin.user.model.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author: dhf
 * @ClassName: AppUserDao
 * @Date: 2022/8/22 10:13
 * @Description:
 * @Version: 1.0
 */
@Repository
public interface AppUserDao {
    int getListCount(Map<String, Object> map);

    List<UserInfo> getList(Map<String, Object> map);

    Map<String, Object> merchantInfo(long uid);

    Map<String, Object> userAccountInfo(long uid);

    int userAccountUpdate(@Param("uid") long uid, @Param("money")long money,@Param("updateTime")String updateTime);

    int userAccountSyncRecordInsert(@Param("uid")long uid,
                                    @Param("oldMoney")long oldMoney,
                                    @Param("newMoney")long newMoney,
                                    @Param("createTime")long  createTime,
                                    @Param("optId")long optId,
                                    @Param("optName")String optName);

    int groupApplyStatus(@Param("uid")long id, @Param("status")int status);

    int groupApplyListCount(Map<String, Object> map);

    List<UserInfo> groupApplyList(Map<String, Object> map);

    int updateStatus(@Param("uid")long id, @Param("status")int status);

    int userWithdrawBlackDel(@Param("uid")long uid);

    int userWithdrawBlackInsert(@Param("uid")long uid, @Param("createTime")long createTime);

    int withdrawRecordStatus(@Param("uid")long uid, @Param("status")int status);

    List<AccountFlow> accountFlowList(Map<String, Object> map);

    int accountFlowListCount(Map<String, Object> map);

    List<Map<String, Object>> redList(Map<String, Object> map);

    int redListCount(Map<String, Object> map);

    List<Map<String, Object>> transferList(Map<String, Object> map);

    int transferListCount(Map<String, Object> map);

    int checkUserAmountListCount();
    List<Map<String, Object>> checkUserAmountList(@Param("begin")int pageIndex, @Param("limit")int limit);

    int checkUserAmountPayListCount(@Param("beginTime")int beginTime, @Param("endTime")int endTime);

    List<Map<String, Object>> checkUserAmountPayList(@Param("beginTime")int beginTime, @Param("endTime")int endTime, @Param("begin")int pageIndex, @Param("limit")int limit);

    void addInfo(UserInfo userInfo);

    void initUserPrivacyConfig(UserInfo userInfo);

    int aliBlack(@Param("configValue")String configValue);

    String aliBlackId();

    UserInfo getUserInfoByPhone(@Param("phone")String phone);

    UserInfo getUserInfoById(@Param("uid")long uid);

    int addBlackIp(@Param("ip")String ip);

    int updateBlackIp(@Param("ip")String ip);
    String configValue(@Param("configKey")String configKey);

    int redCount(@Param("redId") long redId, @Param("uid") long uid);

    int redUpdate(@Param("redId") long redId, @Param("uid") long uid);

    int transferUpdate(@Param("transferId")long transferId, @Param("uid")long uid);

    int transferCount(@Param("transferId")long transferId, @Param("uid")long uid);

    int delUserData(@Param("userId")long userId);

    UserConfig userConfig(@Param("userId")long userId);
    int bankListCount(@Param("userId")long userId, @Param("card_no")String card_no);
    List<Map<String,Object>> bankList(@Param("begin")long begin,@Param("limit")long limit,@Param("userId")long userId, @Param("card_no")String card_no);

    int groupBlackUserCount(@Param("groupId")long groupId, @Param("groupLeaderId")long groupLeaderId, @Param("blackUserId")long blackUserId);

    int groupBlackUser(@Param("groupId")long groupId, @Param("groupLeaderId")long groupLeaderId, @Param("blackUserId")long blackUserId);

    int groupBlackUserUn(@Param("groupId")long groupId, @Param("groupLeaderId")long groupLeaderId, @Param("blackUserId")long blackUserId);

    Map<String, Object> getRedMapInfo(@Param("redId")long redId);

    int getRedDealCount(@Param("redId")long redId);

    int friendListCount(Map<String, Object> map);

    List<UserFriendsInfo> friendListList(Map<String, Object> map);

    int updateAliByUser(@Param("uid")long uid);

    void delWithdraw(@Param("userId")long userId);

    int delAccount(@Param("userId")long userId);

    int bankDel(@Param("id")long id, @Param("uid")long uid);

    List<Map<String, Object>> redRecordList(@Param("redId")long redId);

    List<Map<String, Object>> getRedList(@Param("endTime")String endTime);

    List<Map<String, Object>> getTransList(@Param("endTime")String endTime);

    List<BaseUserFriendsPO> getFriendsListByUserId(@Param("userId")String userId);

    int friendsCopy(@Param("userId")long userId, @Param("type")int type);
}
